let name = '王二小';
let age = 8;

for(var i = 0; i < 5; i++){
  console.log(i);//0,1,2,3,4
};
console.log(i);//5

for(let j = 0; j < 5; j++){
  console.log(j);//0,1,2,3,4
}
//console.log(j);//报错 j is not defined(let有块级作用域)

function show(){
  console.log('我叫王二小，我是个放牛郎');
}
show();

let add = () => {
  console.log('我是箭头函数');
}
add();

setTimeout(()=>{
  console.log('哈哈，我是延时2秒输出的内容，我是个炸弹');
},2000);